inherited crdAddPotr2Act: TcrdAddPotr2Act
  Left = 577
  Top = 303
  VertScrollBar.Range = 0
  ActiveControl = lcbSrvGroup
  BorderIcons = [biSystemMenu, biMinimize, biMaximize, biHelp]
  BorderStyle = bsDialog
  Caption = #1044#1086#1073#1072#1074#1083#1077#1085#1080#1077' '#1087#1086#1090#1088#1077#1073#1083#1077#1085#1080#1103' '#1074' '#1072#1082#1090
  ClientHeight = 230
  ClientWidth = 487
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 200
    Width = 487
    Height = 30
    TabOrder = 3
    inherited BitBtn1: TBitBtn
      Left = 287
      Top = 3
    end
    inherited BitBtn2: TBitBtn
      Left = 389
      Top = 3
    end
  end
  inherited ToolBar1: TToolBar
    Top = 151
    Width = 487
    Height = 0
    TabOrder = 4
  end
  object GroupBox1: TGroupBox [2]
    Left = 0
    Top = 0
    Width = 487
    Height = 105
    Align = alTop
    Caption = ' '#1047#1072#1075#1086#1083#1086#1074#1086#1082' '#1072#1082#1090#1072' '
    TabOrder = 0
    object Label1: TLabel
      Left = 20
      Top = 20
      Width = 30
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1048#1044
    end
    object Label2: TLabel
      Left = 20
      Top = 44
      Width = 30
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1058#1080#1087
    end
    object Label3: TLabel
      Left = 20
      Top = 68
      Width = 30
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072
    end
    object Label4: TLabel
      Left = 252
      Top = 20
      Width = 85
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1053#1072#1095#1072#1083#1086' '#1087#1077#1088#1080#1086#1076#1072
    end
    object Label5: TLabel
      Left = 252
      Top = 44
      Width = 85
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1050#1086#1085#1077#1094' '#1087#1077#1088#1080#1086#1076#1072
    end
    object dbeActId: TDBEditEh
      Left = 60
      Top = 18
      Width = 173
      Height = 19
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'ID'
      DataSource = crdAccpoint.dsc_PotrActs
      EditButtons = <>
      Flat = True
      ReadOnly = True
      TabOrder = 0
      Visible = True
    end
  end
  object GroupBox2: TGroupBox [3]
    Left = 0
    Top = 105
    Width = 487
    Height = 46
    Align = alTop
    Caption = ' '#1059#1089#1083#1091#1075#1072' '
    TabOrder = 1
    object lcbSrvGroup: TDBLookupComboboxEh
      Left = 60
      Top = 16
      Width = 417
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Flat = True
      KeyField = 'ID'
      ListField = 'NAME'
      ListSource = dsc_SrvGroup
      TabOrder = 0
      Visible = True
    end
  end
  object GroupBox3: TGroupBox [4]
    Left = 0
    Top = 151
    Width = 487
    Height = 49
    Align = alClient
    Caption = ' '#1055#1086#1090#1088#1077#1073#1083#1077#1085#1080#1077' '
    TabOrder = 2
    object dbePotr: TDBNumberEditEh
      Left = 60
      Top = 20
      Width = 417
      Height = 19
      AlwaysShowBorder = True
      DecimalPlaces = 5
      EditButtons = <>
      Flat = True
      TabOrder = 0
      Visible = True
    end
  end
  object dbeActType: TDBEditEh [5]
    Left = 60
    Top = 42
    Width = 173
    Height = 19
    AlwaysShowBorder = True
    Color = clInactiveCaptionText
    DataField = 'ACCTYPE'
    DataSource = crdAccpoint.dsc_PotrActs
    EditButtons = <>
    Flat = True
    ReadOnly = True
    TabOrder = 5
    Visible = True
  end
  object dbeActDate: TDBEditEh [6]
    Left = 60
    Top = 66
    Width = 173
    Height = 19
    AlwaysShowBorder = True
    Color = clInactiveCaptionText
    DataField = 'ACT_DATE'
    DataSource = crdAccpoint.dsc_PotrActs
    EditButtons = <>
    Flat = True
    ReadOnly = True
    TabOrder = 6
    Visible = True
  end
  object dbeActBdate: TDBEditEh [7]
    Left = 348
    Top = 18
    Width = 129
    Height = 19
    AlwaysShowBorder = True
    Color = clInactiveCaptionText
    DataField = 'BDATE'
    DataSource = crdAccpoint.dsc_PotrActs
    EditButtons = <>
    Flat = True
    ReadOnly = True
    TabOrder = 7
    Visible = True
  end
  object dbeActEdate: TDBEditEh [8]
    Left = 348
    Top = 42
    Width = 129
    Height = 19
    AlwaysShowBorder = True
    Color = clInactiveCaptionText
    DataField = 'EDATE'
    DataSource = crdAccpoint.dsc_PotrActs
    EditButtons = <>
    Flat = True
    ReadOnly = True
    TabOrder = 8
    Visible = True
  end
  inherited ActionList1: TActionList
    Left = 692
    Top = 22
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Active = False
    Section = 'crdAddPotr2Act'
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width')
    Left = 658
    Top = 20
  end
  object LocalTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 348
    Top = 64
  end
  object ds_SrvGroup: TpFIBDataSet
    SelectSQL.Strings = (
      'select'
      '    id,'
      '    name'
      'from'
      '    services s'
      'where exists (select 1 from vw_straits vw'
      '      where vw.code = '#39'CAN_METER'#39' and vw.service_id = s.id)'
      '  and exists (select 1 from m_accpoint_acts maa'
      
        '              left join proc_accpoint_get_childs (maa.accpoint_i' +
        'd, maa.bdate, maa.edate, 1) p on 1=1'
      
        '              join dogovors dm on dm.accpoint_id = p.raccpoint_i' +
        'd'
      '              join services sm on sm.id = dm.service_id'
      '                and sm.group_id = s.id'
      '              where maa.id = :pact_id'
      '                and dm.id is not null)'
      '  and s.group_id = 0'
      ''
      'order by 2')
    Transaction = crdAccpoint.LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 380
    Top = 64
    oFetchAll = True
    object ds_SrvGroupID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_SrvGroupNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
  end
  object dsc_SrvGroup: TDataSource
    DataSet = ds_SrvGroup
    Left = 412
    Top = 64
  end
  object ds_ActPotr: TpFIBDataSet
    InsertSQL.Strings = (
      'INSERT INTO M_ACT_POTR('
      '    ACT_ID,'
      '    GROUP_ID,'
      '    POTR'
      ')'
      'VALUES('
      '    :ACT_ID,'
      '    :GROUP_ID,'
      '    :POTR'
      ')')
    SelectSQL.Strings = (
      'SELECT'
      '    ACT_ID,'
      '    GROUP_ID,'
      '    POTR'
      'FROM'
      '    M_ACT_POTR '
      'where ACT_ID is null ')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    Left = 444
    Top = 64
    object ds_ActPotrACT_ID: TFIBIntegerField
      FieldName = 'ACT_ID'
    end
    object ds_ActPotrGROUP_ID: TFIBIntegerField
      FieldName = 'GROUP_ID'
    end
    object ds_ActPotrPOTR: TFIBBCDField
      FieldName = 'POTR'
      Size = 3
      RoundByScale = True
    end
  end
end
